package com.sca.commontest.test.designpattern.decorator.hamburger;

/**
 * @Author: denglei
 * @Date: 2022/1/5 15:13
 * @Description:
 */
public class Lettuce extends Condiment {

    Hamburger hamburger;

    public Lettuce(Hamburger hamburger) {
        this.hamburger = hamburger;
    }

    @Override
    public String getName() {
        return hamburger.getName()+"加生菜";
    }

    @Override
    public double getPrice() {
        return hamburger.getPrice()+1.5;
    }
}
